<div class="maintop">
    当前位置：系统权限控制列表
    <a href="javascript:;" action="<?=$basepath?>_add" class="mainFrame button icon-plus">添加权限控制器</a>
    <a href="javascript:;" action="<?=$basepath?>" class="mainFrame button">刷新</a>
    <? if(ISDEBUG){ ?>
        <a href="javascript:$('.debuginfo').toggle();" class="button">调试信息</a>
    <? } ?>
</div>
<div id="mainbody">
    <table width="100%" class="tablist">
            <? foreach($datas as $m){ ?>
                <tr class="trbg"><td colspan="6" class="tdleft icon-sitemap"><?=$m['title'] ?></td></tr>
                <? foreach($m['sub'] as $k=>$v){
                    $ki = $k + 1;
                    if($ki % 2 != 0) echo '<tr>';
                    ?>
                    <td width="30"><input type="checkbox" name="selectValue" value="<?=$v['id']?>" /></td>
                    <td class="tdleft"><?=$v['id']?> - <?=$v['title']?> [<?=$v['action']?>]</td>
                    <td width="80">
                        <a action="<?=$basepath?>_delete?id=<?=$v['id']?>" title="删除" class="mainFrame button icon-trash-2" href="javascript:;"></a>
                        <a action="<?=$basepath?>_edit?id=<?=$v['id']?>" title="编辑" class="mainFrame button icon-edit" href="javascript:;"></a>
                    </td>
                <?
                        if($ki % 2 == 0) echo '</tr>';
                    }
                ?>
            <? } ?>
    </table>
    <? require VIEW.'/page.view.php' ?>
</div>
<script type="text/javascript">
    function beforeSearchForm(){
        var _key = this.sKey.value;
        if(_key.length<=0){
            throw '搜索关键字不能为空';
        }
    }
    function searchForm(self, _html, data){
        $("#iframe").html(_html);
    }
</script>
